object data_mod: Tdata_mod
  OldCreateOrder = False
  Height = 875
  Width = 1131
  object sql_connection: TMyConnection
    Database = 'rating'
    Options.KeepDesignConnected = False
    Username = 'rating_user'
    Password = 'lIl4qj4E'
    Server = 'localhost'
    Connected = True
    LoginPrompt = False
    Left = 48
    Top = 40
  end
  object prepod_table: TMyTable
    TableName = 'prepods'
    Connection = sql_connection
    Left = 48
    Top = 112
  end
  object study_types_table: TMyTable
    TableName = 'study_types'
    Connection = sql_connection
    Left = 144
    Top = 112
  end
  object disciplines_query: TMyQuery
    SQLInsert.Strings = (
      'INSERT INTO disciplines'
      
        '  (discipline_title, discipline_term, max_all_score, id_prepod, ' +
        'id_profile, `5_score`, `4_score`, `3_score`)'
      'VALUES'
      
        '  (:discipline_title, :discipline_term, :max_all_score, :id_prep' +
        'od, :id_profile, :`5_score`, :`4_score`, :`3_score`)')
    SQLDelete.Strings = (
      'DELETE FROM disciplines'
      'WHERE'
      '  id_discipline = :Old_id_discipline')
    SQLUpdate.Strings = (
      'UPDATE disciplines'
      'SET'
      
        '  discipline_title = :discipline_title, discipline_term = :disci' +
        'pline_term, max_all_score = :max_all_score, id_prepod = :id_prep' +
        'od, id_profile = :id_profile, `5_score` = :`5_score`, `4_score` ' +
        '= :`4_score`, `3_score` = :`3_score`'
      'WHERE'
      '  id_discipline = :Old_id_discipline')
    SQLRefresh.Strings = (
      
        'SELECT discipline_title, discipline_term, max_all_score, id_prep' +
        'od, id_profile, `5_score`, `4_score`, `3_score` FROM disciplines'
      'WHERE'
      '  id_discipline = :id_discipline')
    SQLLock.Strings = (
      'SELECT * FROM disciplines'
      'WHERE'
      '  id_discipline = :Old_id_discipline'
      'FOR UPDATE')
    Connection = sql_connection
    SQL.Strings = (
      
        'SELECT id_discipline, discipline_title, discipline_term, 5_score' +
        ', 4_score, 3_score,'
      ' max_all_score, prepod_fio, id_profile, id_prepod'
      'FROM disciplines'
      'NATURAL JOIN prepods'
      'WHERE id_profile=:id_profile')
    Left = 544
    Top = 120
    ParamData = <
      item
        DataType = ftInteger
        Name = 'id_profile'
        ParamType = ptInput
        Value = 1
      end>
  end
  object discipline_for_open_rating_query: TMyQuery
    SQLInsert.Strings = (
      'INSERT INTO disciplines'
      
        '  (discipline_title, discipline_term, max_all_score, id_prepod, ' +
        'id_profile)'
      'VALUES'
      
        '  (:discipline_title, :discipline_term, :max_all_score, :id_prep' +
        'od, :id_profile)')
    SQLDelete.Strings = (
      'DELETE FROM disciplines'
      'WHERE'
      '  id_discipline = :Old_id_discipline')
    SQLUpdate.Strings = (
      'UPDATE disciplines'
      'SET'
      
        '  discipline_title = :discipline_title, discipline_term = :disci' +
        'pline_term, max_all_score = :max_all_score, id_prepod = :id_prep' +
        'od, id_profile = :id_profile'
      'WHERE'
      '  id_discipline = :Old_id_discipline')
    SQLRefresh.Strings = (
      
        'SELECT discipline_title, discipline_term, max_all_score, id_prep' +
        'od, id_profile FROM disciplines'
      'WHERE'
      '  id_discipline = :id_discipline')
    SQLLock.Strings = (
      'SELECT * FROM disciplines'
      'WHERE'
      '  id_discipline = :Old_id_discipline'
      'FOR UPDATE')
    Connection = sql_connection
    SQL.Strings = (
      
        'SELECT id_discipline, discipline_title, discipline_term, id_prof' +
        'ile'
      'FROM disciplines'
      'WHERE id_prepod=:id_ved_prepod'
      'AND id_profile=:id_profile')
    Left = 80
    Top = 280
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'id_ved_prepod'
      end
      item
        DataType = ftUnknown
        Name = 'id_profile'
      end>
  end
  object prepod_for_user_combo_query: TMyQuery
    Connection = sql_connection
    SQL.Strings = (
      'SELECT id_prepod, prepod_fio,prepod_login,prepod_password'
      'FROM prepods'
      'WHERE id_prepod IN ('
      'SELECT id_prepod'
      'FROM disciplines)')
    Left = 80
    Top = 392
  end
  object study_plan_query: TMyQuery
    SQLInsert.Strings = (
      'INSERT INTO study_plan'
      
        '  (id_discipline, mark_type, formula, max_score, k_sp, lesson_ty' +
        'pe_title)'
      'VALUES'
      
        '  (:id_discipline, :mark_type, :formula, :max_score, :k_sp, :les' +
        'son_type_title)')
    SQLDelete.Strings = (
      'DELETE FROM study_plan'
      'WHERE'
      '  id_study_plan = :Old_id_study_plan')
    SQLUpdate.Strings = (
      'UPDATE study_plan'
      'SET'
      
        '  id_discipline = :id_discipline, mark_type = :mark_type, formul' +
        'a = :formula, max_score = :max_score, k_sp = :k_sp, lesson_type_' +
        'title = :lesson_type_title'
      'WHERE'
      '  id_study_plan = :Old_id_study_plan')
    SQLRefresh.Strings = (
      
        'SELECT id_discipline, mark_type, formula, max_score, k_sp, lesso' +
        'n_type_title FROM study_plan'
      'WHERE'
      '  id_study_plan = :id_study_plan')
    SQLLock.Strings = (
      'SELECT * FROM study_plan'
      'WHERE'
      '  id_study_plan = :Old_id_study_plan'
      'FOR UPDATE')
    Connection = sql_connection
    SQL.Strings = (
      'SELECT'
      'lesson_type_title,'
      
        'mark_type, formula, k_sp, id_discipline, id_study_plan, max_scor' +
        'e'
      'FROM study_plan'
      'WHERE id_discipline=:id_discipline')
    Left = 80
    Top = 504
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'id_discipline'
      end>
  end
  object marks_query: TMyQuery
    SQLInsert.Strings = (
      'INSERT INTO marks'
      
        '  (id_study_plan, mark_symbol, mark_mean, mark_score, k_mark, ma' +
        'rk_var)'
      'VALUES'
      
        '  (:id_study_plan, :mark_symbol, :mark_mean, :mark_score, :k_mar' +
        'k, :mark_var)')
    SQLDelete.Strings = (
      'DELETE FROM marks'
      'WHERE'
      '  id_mark = :Old_id_mark')
    SQLUpdate.Strings = (
      'UPDATE marks'
      'SET'
      
        '  id_study_plan = :id_study_plan, mark_symbol = :mark_symbol, ma' +
        'rk_mean = :mark_mean, mark_score = :mark_score, k_mark = :k_mark' +
        ', mark_var = :mark_var'
      'WHERE'
      '  id_mark = :Old_id_mark')
    SQLRefresh.Strings = (
      
        'SELECT id_study_plan, mark_symbol, mark_mean, mark_score, k_mark' +
        ', mark_var FROM marks'
      'WHERE'
      '  id_mark = :id_mark')
    SQLLock.Strings = (
      'SELECT * FROM marks'
      'WHERE'
      '  id_mark = :Old_id_mark'
      'FOR UPDATE')
    Connection = sql_connection
    SQL.Strings = (
      'SELECT *'
      'FROM marks'
      'WHERE id_study_plan=:id_study_plan')
    Left = 672
    Top = 272
    ParamData = <
      item
        DataType = ftInteger
        Name = 'id_study_plan'
        ParamType = ptInput
        Value = 1
      end>
  end
  object prepod_source: TMyDataSource
    DataSet = prepod_table
    Left = 48
    Top = 168
  end
  object study_types_source: TMyDataSource
    DataSet = study_types_table
    Left = 144
    Top = 168
  end
  object schools_source: TMyDataSource
    DataSet = schools_query
    Left = 384
    Top = 176
  end
  object profiles_source: TMyDataSource
    DataSet = profiles_query
    Left = 464
    Top = 176
  end
  object disciplines_source: TMyDataSource
    DataSet = disciplines_query
    Left = 544
    Top = 176
  end
  object groups_source: TMyDataSource
    DataSet = groups_query
    Left = 640
    Top = 176
  end
  object students_source: TMyDataSource
    DataSet = students_query
    Left = 728
    Top = 176
  end
  object steps_source: TMyDataSource
    DataSet = steps_query
    Left = 336
    Top = 320
  end
  object substeps_source: TMyDataSource
    DataSet = substeps_query
    Left = 448
    Top = 320
  end
  object marks_source: TMyDataSource
    DataSet = marks_query
    Left = 672
    Top = 320
  end
  object prepod_for_user_combo_source: TMyDataSource
    DataSet = prepod_for_user_combo_query
    Left = 80
    Top = 440
  end
  object study_plan_source: TMyDataSource
    DataSet = study_plan_query
    Left = 80
    Top = 552
  end
  object discipline_for_open_rating_source: TMyDataSource
    DataSet = discipline_for_open_rating_query
    Left = 80
    Top = 328
  end
  object groups_for_prepod_unit_query: TMyQuery
    Connection = sql_connection
    SQL.Strings = (
      'SELECT * FROM groups')
    Left = 720
    Top = 552
  end
  object groups_for_prepod_unit_source: TMyDataSource
    DataSet = groups_for_prepod_unit_query
    Left = 720
    Top = 600
  end
  object discipline_for_prepod_query: TMyQuery
    Connection = sql_connection
    SQL.Strings = (
      'SELECT * FROM disciplines'
      'WHERE id_prepod=:id_prepod')
    Left = 720
    Top = 448
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'id_prepod'
      end>
  end
  object discipline_for_prepod_source: TMyDataSource
    DataSet = discipline_for_prepod_query
    Left = 720
    Top = 496
  end
  object rating_step_query: TMyQuery
    Connection = sql_connection
    SQL.Strings = (
      'SELECT id_step_rating,datestamp,id_mark,'
      'mark_symbol,mark_mean,'
      'prepod_fio'
      'FROM steps_rating'
      'NATURAL JOIN prepods'
      'NATURAL JOIN marks'
      'WHERE id_step=:id_step'
      'AND id_student=:id_student')
    Left = 336
    Top = 576
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'id_step'
      end
      item
        DataType = ftUnknown
        Name = 'id_student'
      end>
  end
  object rating_step_source: TMyDataSource
    DataSet = rating_step_query
    Left = 336
    Top = 632
  end
  object MyCommand1: TMyCommand
    Connection = sql_connection
    Left = 1024
    Top = 48
  end
  object MyQuery1: TMyQuery
    Connection = sql_connection
    SQL.Strings = (
      'SELECT * FROM prepods')
    Left = 1032
    Top = 120
  end
  object assistents_query: TMyQuery
    SQLInsert.Strings = (
      'INSERT INTO assistents'
      '  (id_study_plan, id_prepod, id_group)'
      'VALUES'
      '  (:id_study_plan, :id_prepod, :id_group)')
    SQLDelete.Strings = (
      'DELETE FROM assistents'
      'WHERE'
      '  id_assistent = :Old_id_assistent')
    SQLUpdate.Strings = (
      'UPDATE assistents'
      'SET'
      
        '  id_study_plan = :id_study_plan, id_prepod = :id_prepod, id_gro' +
        'up = :id_group'
      'WHERE'
      '  id_assistent = :Old_id_assistent')
    Connection = sql_connection
    SQL.Strings = (
      
        'SELECT id_assistent,id_study_plan,assistents.id_prepod,assistent' +
        's.id_group,'
      'prepod_fio, group_title'
      'FROM assistents'
      'NATURAL JOIN prepods'
      'NATURAL JOIN groups'
      'WHERE id_study_plan=:id_study_plan')
    Left = 944
    Top = 448
    ParamData = <
      item
        DataType = ftInteger
        Name = 'id_study_plan'
        ParamType = ptInput
        Value = 1
      end>
  end
  object assistens_source: TMyDataSource
    DataSet = assistents_query
    Left = 944
    Top = 504
  end
  object groups_query: TMyQuery
    SQLInsert.Strings = (
      'INSERT INTO groups'
      '  (group_title, group_course, id_profile)'
      'VALUES'
      '  (:group_title, :group_course, :id_profile)')
    SQLDelete.Strings = (
      'DELETE FROM groups'
      'WHERE'
      '  id_group = :Old_id_group')
    SQLUpdate.Strings = (
      'UPDATE groups'
      'SET'
      
        '  group_title = :group_title, group_course = :group_course, id_p' +
        'rofile = :id_profile'
      'WHERE'
      '  id_group = :Old_id_group')
    SQLRefresh.Strings = (
      'SELECT group_title, group_course, id_profile FROM groups'
      'WHERE'
      '  id_group = :id_group')
    SQLLock.Strings = (
      'SELECT * FROM groups'
      'WHERE'
      '  id_group = :Old_id_group'
      'FOR UPDATE')
    Connection = sql_connection
    SQL.Strings = (
      'SELECT *'
      'FROM groups'
      'WHERE id_profile=:id_profile')
    Left = 640
    Top = 120
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'id_profile'
      end>
  end
  object substeps_query: TMyQuery
    SQLInsert.Strings = (
      'INSERT INTO substeps'
      '  (id_step, substep_title, k_substep, substep_max_score)'
      'VALUES'
      '  (:id_step, :substep_title, :k_substep, :substep_max_score)')
    SQLDelete.Strings = (
      'DELETE FROM substeps'
      'WHERE'
      '  id_substep = :Old_id_substep')
    SQLUpdate.Strings = (
      'UPDATE substeps'
      'SET'
      
        '  id_step = :id_step, substep_title = :substep_title, k_substep ' +
        '= :k_substep, substep_max_score = :substep_max_score'
      'WHERE'
      '  id_substep = :Old_id_substep')
    SQLRefresh.Strings = (
      
        'SELECT id_step, substep_title, k_substep, substep_max_score FROM' +
        ' substeps'
      'WHERE'
      '  id_substep = :id_substep')
    SQLLock.Strings = (
      'SELECT * FROM substeps'
      'WHERE'
      '  id_substep = :Old_id_substep'
      'FOR UPDATE')
    Connection = sql_connection
    SQL.Strings = (
      
        'SELECT substep_title, substep_date_1, substep_date_2, substep_da' +
        'te_3,'
      ' substep_max_score, id_step, k_substep, id_substep'
      'FROM substep_dates'
      'NATURAL JOIN substeps'
      'WHERE id_step=:id_step'
      'AND id_group=:id_group')
    Left = 448
    Top = 272
    ParamData = <
      item
        DataType = ftInteger
        Name = 'id_step'
        ParamType = ptInput
        Value = 6
      end
      item
        DataType = ftUnknown
        Name = 'id_group'
      end>
  end
  object rating_substep_query: TMyQuery
    SQLInsert.Strings = (
      'INSERT INTO substeps_rating'
      '  (id_student, id_substep, id_prepod, pass_score, datestamp)'
      'VALUES'
      
        '  (:id_student, :id_substep, :id_prepod, :pass_score, :datestamp' +
        ')')
    SQLDelete.Strings = (
      'DELETE FROM substeps_rating'
      'WHERE'
      '  id_substep_rating = :Old_id_substep_rating')
    SQLUpdate.Strings = (
      'UPDATE substeps_rating'
      'SET'
      
        '  id_student = :id_student, id_substep = :id_substep, id_prepod ' +
        '= :id_prepod, pass_score = :pass_score, datestamp = :datestamp'
      'WHERE'
      '  id_substep_rating = :Old_id_substep_rating')
    SQLRefresh.Strings = (
      
        'SELECT id_student, id_substep, id_prepod, pass_score, datestamp ' +
        'FROM substeps_rating'
      'WHERE'
      '  id_substep_rating = :id_substep_rating')
    SQLLock.Strings = (
      'SELECT * FROM substeps_rating'
      'WHERE'
      '  id_substep_rating = :Old_id_substep_rating'
      'FOR UPDATE')
    Connection = sql_connection
    SQL.Strings = (
      'SELECT id_substep,pass_score, datestamp, id_student, id_prepod,'
      'prepod_fio, id_substep_rating'
      'FROM substeps_rating'
      'NATURAL JOIN prepods'
      'WHERE id_substep=:id_substep'
      'AND id_student=:id_student')
    Left = 448
    Top = 576
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'id_substep'
      end
      item
        DataType = ftUnknown
        Name = 'id_student'
      end>
  end
  object rating_substep_source: TMyDataSource
    DataSet = rating_substep_query
    Left = 448
    Top = 632
  end
  object steps_query: TMyQuery
    SQLInsert.Strings = (
      'INSERT INTO steps'
      '  (id_study_plan, step_title, k_step, step_max_score)'
      'VALUES'
      '  (:id_study_plan, :step_title, :k_step, :step_max_score)')
    SQLDelete.Strings = (
      'DELETE FROM steps'
      'WHERE'
      '  id_step = :Old_id_step')
    SQLUpdate.Strings = (
      'UPDATE steps'
      'SET'
      
        '  id_study_plan = :id_study_plan, step_title = :step_title, k_st' +
        'ep = :k_step, step_max_score = :step_max_score'
      'WHERE'
      '  id_step = :Old_id_step')
    SQLRefresh.Strings = (
      
        'SELECT id_study_plan, step_title, k_step, step_max_score FROM st' +
        'eps'
      'WHERE'
      '  id_step = :id_step')
    SQLLock.Strings = (
      'SELECT * FROM steps'
      'WHERE'
      '  id_step = :Old_id_step'
      'FOR UPDATE')
    Connection = sql_connection
    SQL.Strings = (
      
        'SELECT id_step, step_title, id_study_plan, k_step, step_max_scor' +
        'e, step_date'
      'FROM step_dates'
      'NATURAL JOIN steps'
      'WHERE id_study_plan=:id_study_plan'
      'AND id_group=:id_group')
    Left = 336
    Top = 272
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'id_study_plan'
      end
      item
        DataType = ftUnknown
        Name = 'id_group'
      end>
  end
  object substeps_for_rating_solve_query: TMyQuery
    Connection = sql_connection
    SQL.Strings = (
      'SELECT DISTINCT step_title,substep_title, substep_max_score'
      'FROM substeps'
      'NATURAL JOIN steps'
      'NATURAL JOIN step_dates'
      'WHERE substeps.id_step IN ('
      'SELECT DISTINCT id_step'
      'FROM steps'
      'WHERE id_study_plan=:id_study_plan)'
      'ORDER BY step_date')
    Left = 808
    Top = 272
    ParamData = <
      item
        DataType = ftInteger
        Name = 'id_study_plan'
        ParamType = ptInput
        Value = 2
      end>
  end
  object substeps_for_rating_solve_source: TMyDataSource
    DataSet = substeps_for_rating_solve_query
    Left = 808
    Top = 328
  end
  object profiles_query: TMyQuery
    SQLInsert.Strings = (
      'INSERT INTO profiles'
      '  (profile_title, profile_short_title, id_school)'
      'VALUES'
      '  (:profile_title, :profile_short_title, :id_school)')
    SQLDelete.Strings = (
      'DELETE FROM profiles'
      'WHERE'
      '  id_profile = :Old_id_profile')
    SQLUpdate.Strings = (
      'UPDATE profiles'
      'SET'
      
        '  profile_title = :profile_title, profile_short_title = :profile' +
        '_short_title, id_school = :id_school'
      'WHERE'
      '  id_profile = :Old_id_profile')
    Connection = sql_connection
    SQL.Strings = (
      'SELECT * FROM profiles'
      'WHERE id_school=:id_school')
    Left = 464
    Top = 120
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'id_school'
      end>
  end
  object schools_query: TMyQuery
    SQLInsert.Strings = (
      'INSERT INTO schools'
      '  (school_title, school_short_title, id_study_type)'
      'VALUES'
      '  (:school_title, :school_short_title, :id_study_type)')
    SQLDelete.Strings = (
      'DELETE FROM schools'
      'WHERE'
      '  id_school = :Old_id_school')
    SQLUpdate.Strings = (
      'UPDATE schools'
      'SET'
      
        '  school_title = :school_title, school_short_title = :school_sho' +
        'rt_title, id_study_type = :id_study_type'
      'WHERE'
      '  id_school = :Old_id_school')
    Connection = sql_connection
    SQL.Strings = (
      'SELECT * FROM schools'
      'WHERE id_study_type=:id_study_type')
    Left = 384
    Top = 120
    ParamData = <
      item
        DataType = ftInteger
        Name = 'id_study_type'
        ParamType = ptInput
        Value = 1
      end>
  end
  object students_query: TMyQuery
    SQLInsert.Strings = (
      'INSERT INTO students'
      
        '  (student_fio, student_begin_year, student_end_year, id_group, ' +
        'subgroup)'
      'VALUES'
      
        '  (:student_fio, :student_begin_year, :student_end_year, :id_gro' +
        'up, :subgroup)')
    SQLDelete.Strings = (
      'DELETE FROM students'
      'WHERE'
      '  id_student = :Old_id_student')
    SQLUpdate.Strings = (
      'UPDATE students'
      'SET'
      
        '  student_fio = :student_fio, student_begin_year = :student_begi' +
        'n_year, student_end_year = :student_end_year, id_group = :id_gro' +
        'up, subgroup = :subgroup'
      'WHERE'
      '  id_student = :Old_id_student')
    SQLRefresh.Strings = (
      
        'SELECT student_fio, student_begin_year, student_end_year, id_gro' +
        'up, subgroup FROM students'
      'WHERE'
      '  id_student = :id_student')
    SQLLock.Strings = (
      'SELECT * FROM students'
      'WHERE'
      '  id_student = :Old_id_student'
      'FOR UPDATE')
    Connection = sql_connection
    SQL.Strings = (
      'SELECT * FROM students'
      'WHERE id_group=:id_group')
    Left = 728
    Top = 120
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'id_group'
      end>
  end
  object MyQuery2: TMyQuery
    Connection = sql_connection
    SQL.Strings = (
      'SELECT * FROM prepods')
    Left = 1032
    Top = 176
  end
  object MyQuery3: TMyQuery
    Connection = sql_connection
    SQL.Strings = (
      'SELECT * FROM prepods')
    Left = 1032
    Top = 232
  end
  object MyQuery4: TMyQuery
    Connection = sql_connection
    SQL.Strings = (
      'SELECT * FROM prepods')
    Left = 1032
    Top = 288
  end
  object MyQuery5: TMyQuery
    Connection = sql_connection
    SQL.Strings = (
      'SELECT * FROM prepods')
    Left = 1032
    Top = 344
  end
  object step_dates_query: TMyQuery
    SQLInsert.Strings = (
      'INSERT INTO step_dates'
      '  (id_step, id_group, step_date)'
      'VALUES'
      '  (:id_step, :id_group, :step_date)')
    SQLDelete.Strings = (
      'DELETE FROM step_dates'
      'WHERE'
      '  id_step_date = :Old_id_step_date')
    SQLUpdate.Strings = (
      'UPDATE step_dates'
      'SET'
      
        '  id_step = :id_step, id_group = :id_group, step_date = :step_da' +
        'te'
      'WHERE'
      '  id_step_date = :Old_id_step_date')
    SQLRefresh.Strings = (
      'SELECT id_step, id_group, step_date FROM step_dates'
      'WHERE'
      '  id_step_date = :id_step_date')
    SQLLock.Strings = (
      'SELECT * FROM step_dates'
      'WHERE'
      '  id_step_date = :Old_id_step_date'
      'FOR UPDATE')
    Connection = sql_connection
    SQL.Strings = (
      'SELECT id_step_date, group_title, step_date, id_step, id_group'
      'FROM step_dates'
      'NATURAL JOIN groups'
      'WHERE id_step=:id_step')
    Left = 336
    Top = 384
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'id_step'
      end>
  end
  object substep_dates_query: TMyQuery
    SQLInsert.Strings = (
      'INSERT INTO substep_dates'
      
        '  (id_substep, id_group, substep_date_1, substep_date_2, substep' +
        '_date_3)'
      'VALUES'
      
        '  (:id_substep, :id_group, :substep_date_1, :substep_date_2, :su' +
        'bstep_date_3)')
    SQLDelete.Strings = (
      'DELETE FROM substep_dates'
      'WHERE'
      '  id_substep_date = :Old_id_substep_date')
    SQLUpdate.Strings = (
      'UPDATE substep_dates'
      'SET'
      
        '  id_substep = :id_substep, id_group = :id_group, substep_date_1' +
        ' = :substep_date_1, substep_date_2 = :substep_date_2, substep_da' +
        'te_3 = :substep_date_3'
      'WHERE'
      '  id_substep_date = :Old_id_substep_date')
    SQLRefresh.Strings = (
      
        'SELECT id_substep, id_group, substep_date_1, substep_date_2, sub' +
        'step_date_3 FROM substep_dates'
      'WHERE'
      '  id_substep_date = :id_substep_date')
    SQLLock.Strings = (
      'SELECT * FROM substep_dates'
      'WHERE'
      '  id_substep_date = :Old_id_substep_date'
      'FOR UPDATE')
    Connection = sql_connection
    SQL.Strings = (
      
        'SELECT id_substep_date,group_title, substep_date_1, substep_date' +
        '_2, substep_date_3,'
      'id_substep, id_group'
      'FROM substep_dates'
      'NATURAL JOIN groups'
      'WHERE id_substep=:id_substep')
    Left = 448
    Top = 384
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'id_substep'
      end>
  end
  object step_dates_source: TMyDataSource
    DataSet = step_dates_query
    Left = 336
    Top = 440
  end
  object substep_dates_source: TMyDataSource
    DataSet = substep_dates_query
    Left = 448
    Top = 440
  end
  object ss_r_dates_query: TMyQuery
    SQLInsert.Strings = (
      'INSERT INTO ss_r_dates'
      '  (id_substep_rating, pdate, pperc, id_prepod)'
      'VALUES'
      '  (:id_substep_rating, :pdate, :pperc, :id_prepod)')
    SQLDelete.Strings = (
      'DELETE FROM ss_r_dates'
      'WHERE'
      '  id_ss_r_date = :Old_id_ss_r_date')
    SQLUpdate.Strings = (
      'UPDATE ss_r_dates'
      'SET'
      
        '  id_substep_rating = :id_substep_rating, pdate = :pdate, pperc ' +
        '= :pperc, id_prepod = :id_prepod'
      'WHERE'
      '  id_ss_r_date = :Old_id_ss_r_date')
    SQLRefresh.Strings = (
      
        'SELECT id_substep_rating, pdate, pperc, id_prepod FROM ss_r_date' +
        's'
      'WHERE'
      '  id_ss_r_date = :id_ss_r_date')
    SQLLock.Strings = (
      'SELECT * FROM ss_r_dates'
      'WHERE'
      '  id_ss_r_date = :Old_id_ss_r_date'
      'FOR UPDATE')
    Connection = sql_connection
    SQL.Strings = (
      'SELECT id_ss_r_date, id_substep_rating,id_prepod,pdate, pperc'
      'FROM ss_r_dates'
      'NATURAL JOIN prepods'
      'WHERE id_substep_rating=:id_substep_rating')
    Left = 80
    Top = 704
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'id_substep_rating'
      end>
  end
  object ss_r_dates_source: TMyDataSource
    DataSet = ss_r_dates_query
    Left = 80
    Top = 760
  end
  object ss_r_decay_query: TMyQuery
    SQLInsert.Strings = (
      'INSERT INTO ss_r_decay'
      '  (id_study_plan, days, decay)'
      'VALUES'
      '  (:id_study_plan, :days, :decay)')
    SQLDelete.Strings = (
      'DELETE FROM ss_r_decay'
      'WHERE'
      '  id_ss_r_decay = :Old_id_ss_r_decay')
    SQLUpdate.Strings = (
      'UPDATE ss_r_decay'
      'SET'
      '  id_study_plan = :id_study_plan, days = :days, decay = :decay'
      'WHERE'
      '  id_ss_r_decay = :Old_id_ss_r_decay')
    SQLRefresh.Strings = (
      'SELECT id_study_plan, days, decay FROM ss_r_decay'
      'WHERE'
      '  id_ss_r_decay = :id_ss_r_decay')
    SQLLock.Strings = (
      'SELECT * FROM ss_r_decay'
      'WHERE'
      '  id_ss_r_decay = :Old_id_ss_r_decay'
      'FOR UPDATE')
    Connection = sql_connection
    SQL.Strings = (
      'SELECT id_ss_r_decay, id_study_plan, days, decay'
      'FROM ss_r_decay'
      'WHERE id_study_plan=:id_study_plan')
    Left = 176
    Top = 704
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'id_study_plan'
      end>
  end
  object ss_r_decay_source: TMyDataSource
    DataSet = ss_r_decay_query
    Left = 176
    Top = 760
  end
end
